package cloud.xiangyixiang.www.spring.boot.java.basics.enums;

/**
 * <p>
 * 枚举类定义抽象方法
 * </p>
 *
 * @author weixin
 * @date 2023/9/5 14:48
 */
public enum SeasonEnum {

    SPRING("1", "春季"){
        @Override
        public SeasonEnum getNextSeason() {
            return SUMMER;
        }
    },
    SUMMER("4", "夏季"){
        @Override
        public SeasonEnum getNextSeason() {
            return AUTUMN;
        }
    },
    AUTUMN("7", "秋季"){
        @Override
        public SeasonEnum getNextSeason() {
            return WINTER;
        }
    },
    WINTER("10", "冬季"){
        @Override
        public SeasonEnum getNextSeason() {
            return SPRING;
        }
    };

    /**
     * 季节开始月份
     */
    private String monthStart;

    /**
     * 季节名称
     */
    private String season;

    private SeasonEnum(String monthStart, String season) {
        this.monthStart = monthStart;
        this.season = season;
    }

    public abstract SeasonEnum getNextSeason();

    public String getMonthStart() {
        return monthStart;
    }

    public void setMonthStart(String monthStart) {
        this.monthStart = monthStart;
    }

    public String getSeason() {
        return season;
    }

    public void setSeason(String season) {
        this.season = season;
    }

}
